home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
comm
/
misc
/
xqsrc1_7.lzh
/
include
/
execlists.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-06-21
|
1KB
|
42 lines
/*
* Support for exec lists
*/
#include <exec/types.h>
#include <exec/lists.h>
#include <exec/nodes.h>
/*
* Access to list functions without type casting
*/
#define INSERT(l, n, p) Insert((struct List *)(l), (struct Node *)(n), (struct Node *)(p))
#define ADDHEAD(l, n) AddHead((struct List *)(l), (struct Node *)(n))
#define ADDTAIL(l, n) AddTail((struct List *)(l), (struct Node *)(n))
#define REMOVE(n) Remove((struct Node *)(n))
#define REMHEAD(l) ((void *)RemHead((struct List *)(l)))
#define REMTAIL(l) ((void *)RemTail((struct List *)(l)))
#define ENQUEUE(l, n) Enqueue((struct List *)(l), (struct Node *)(n))
#define FINDNAME(l, n) ((void *)FindName((struct List *)(l), (UBYTE *)(n)))
#define NEWLIST(l) NewList((struct List *)l)
/*
* Other useful list macros
*/
#define FIRST(l) ((void *)(((struct List *)(l))->lh_Head))
#define NEXT(n) ((void *)(((struct Node *)(n))->ln_Succ))
#define LAST(l) ((void *)(((struct List *)(l))->lh_Tail))
#define PREV(n) ((void *)(((struct Node *)(n))->ln_Pred))
#define MORENODES(n) (((struct Node *)(n))->ln_Succ)
/*
* Example calling sequence for the above
for (n = FIRST(l); MORENODES(n); n = NEXT(n)) {
*
*/